package tgc.edu.yzy.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tgc.edu.yzy.custom.CommonService;
import tgc.edu.yzy.entity.Dapa;
import tgc.edu.yzy.entity.User;
import tgc.edu.yzy.repository.UserRepository;
@Service
public class UserService extends CommonService<User,Integer>{
	@Autowired
	private UserRepository userDAO;

	public User findByUsername(String username) {
		return userDAO.findByUsername(username);
	}

	public List<User> findByDapaId(Integer id) {
		return userDAO.findByDapaId(id);
	}

	public List<User> findByDapa(Dapa dapass) {
		return userDAO.findByDapa(dapass);
	}
}
